import http from '@/utils/http'
enum Api {
  ExperiencePageApi = '/experience/page',
  ExperienceSaveFilesApi = '/experience/saveFiles',
  ExperienceDelFilesApi = '/experience/removeByFiles',
  ExperienceSaveApi = '/experience/save',
  ExperienceRemoveApi = '/experience/remove',
  ExperienceUpdateApi = '/experience/update',
  ExperienceDetailApi = '/experience/detail',
  ExperienceGetFileApi = '/auditor/GetFile',

}
// 修改经验库单条数据

export const ExperienceUpdateApi = async (data) => {
  return http.filePost(Api.ExperienceUpdateApi, data)
}
export const ExperienceRemoveApi = async (params) => {
  return http.deleteApi(Api.ExperienceRemoveApi, params)
}
// 新增经验库数据
export const ExperienceSaveApi = async (data) => {
  return http.filePost(Api.ExperienceSaveApi, data)
}
// markDown 图片上传
export const ExperienceSaveFilesApi = async (data) => {
  return http.newPost(Api.ExperienceSaveFilesApi, data)
}
// markDown 图片删除
export const ExperienceDelFilesApi = async (data) => {
  return http.deleteApi(Api.ExperienceDelFilesApi, data)
}

export const ExperiencePageApi = async (params) => {
  return http.get(Api.ExperiencePageApi, params)
}
// 经验库详情
export const ExperienceDetailApi = async (params) => {
  return http.get(Api.ExperienceDetailApi, params)
}
// 文件预览
export const ExperienceGetFileApi = async (params) => {
  return http.getImages(Api.ExperienceGetFileApi, params)
}